am graph tutorial